// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-9-23

#ifndef __USERINFOCTRL_H_CLIENT_MAIN__
#define __USERINFOCTRL_H_CLIENT_MAIN__

#pragma once

#include <common\ui\pagectrl.h>
#include <common\ui\button.h>
#include <common\ui\tooltip.h>

class CJoyUserInfoCtrl;
class CJoyUserAvatar;
class CJoyUserDetail;
class CJoyUserItem;

//##ModelId=44C4B5D901D4
class CJoyUserInfoContainer : public CJoyPageContainer
{
	DECLARE_DYNAMIC(CJoyUserInfoContainer)

protected:
	//##ModelId=44C4B5D901D6
    int     m_cornerSize;
	//##ModelId=44C4B5D901E5
    Color   m_frameColor;

	//##ModelId=44C4B5D901E9
    virtual void CM_LoadSkin(CJoyXmlElement* pSkinElem);
	//##ModelId=44C4B5D901F4
    virtual void CM_Draw(Graphics& graph);
public:
	//##ModelId=44C4B5D901F7
    CJoyUserInfoContainer(CJoyUserInfoCtrl* pageCtrl);
	//##ModelId=44C4B5D901F9
    virtual ~CJoyUserInfoContainer();
public:
    DECLARE_MESSAGE_MAP()
};

//##ModelId=44C4B5D90203
enum JoyUserInfoSize
{
	//##ModelId=44C4B5D90205
    UIS_Max,
	//##ModelId=44C4B5D90213
    UIS_Mid,
	//##ModelId=44C4B5D90214
    UIS_Min,
};

//##ModelId=44C4B5D90222
class CJoyUserInfoCtrl :
    public CJoyPageCtrl
{
	DECLARE_DYNAMIC(CJoyUserInfoCtrl)
public:
	//##ModelId=44C4B5D90234
    CJoyUserAvatar* m_avatar;
	//##ModelId=44C4B5D90239
    CJoyUserDetail* m_detail;

	//##ModelId=44C4B5D90243
    CJoyButton* m_scale;
	//##ModelId=44C4B5D90248
    CJoyButton* m_change;
	//##ModelId=44C4B5D9024D
    CJoyButton* m_ladder;

	//##ModelId=44C4B5D90251
    int m_maxSize;
	//##ModelId=44C4B5D90252
    int m_midSize;
	//##ModelId=44C4B5D90253
    int m_minSize;

	//##ModelId=44C4B5D90262
    CJoyToolTip m_toolTip;

	//##ModelId=44C4B5D90266
    void SetUserItem(CJoyUserItem* pUserItem);
	//##ModelId=44C4B5D90268
    void ShowPages(bool b);
	//##ModelId=44C4B5D90272
    void CM_ScaleClick(CJoyButton*);
	//##ModelId=44C4B5D90274
    void CM_ChangeClick(CJoyButton*);
	//##ModelId=44C4B5D90276
    void CM_LadderClick(CJoyButton*);
	//##ModelId=44C4B5D90281
    virtual CJoyPageContainer* CreateContainer();
	//##ModelId=44C4B5D90283
    virtual void CM_LoadSkin(CJoyXmlElement* pSkinElem);
	//##ModelId=44C4B5D90286
    virtual void OnSelTab(CJoyCheckBox* box, bool& checked);
public:
	//##ModelId=44C4B5D90292
    CJoyUserInfoCtrl(void);
	//##ModelId=44C4B5D90294
    virtual ~CJoyUserInfoCtrl(void);
public:
    DECLARE_MESSAGE_MAP()
	//##ModelId=44C4B5D9029F
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);

	//##ModelId=44C4B5D902A2
    afx_msg void OnDestroy();
};

#endif  // __USERINFOCTRL_H_CLIENT_MAIN__
